<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="com.java.service.*,java.util.*,com.java.model.UserSession,com.java.util.*"%>
<jsp:include page="/jsp/common/header.jsp"></jsp:include>
<%

	ArrayList al1 = null;
	ArrayList al2 = null;
	ArrayList al3 = null;
	
	HashMap map_al1 = null;
	HashMap map_al2 = null;
	HashMap map_al3 = null;
	
	String uni_id 		= CmmUtil.nvl(request.getParameter("uni_id"),"");
	String login_nm 	= CmmUtil.nvl(request.getParameter("login_nm"),"");
	
	HashMap map = new HashMap();
	HashMap map1 = null;
	ArrayList list = new ArrayList();
	CommonDaoService commonservice = new CommonDaoService("Com0101lp03Pop02Dao");
	map.put("uni_id",uni_id);
	
	list = (ArrayList)commonservice.commonDaoMethod(map);
	
	al1 = (ArrayList)list.get(0); //학습중인과정
	al2 = (ArrayList)list.get(1); //수강 신청중인 과정
	al3 = (ArrayList)list.get(2); //학습종료 과정
	
	int self_height = al1.size() + al2.size() + al3.size();
	self_height = (self_height * 50) + 330;
	
	
	System.out.println("listlistlistlistlist  " + list);
	
%>
<script>
	self.resizeTo(530,<%=self_height%>);
</script>
<body>
<table width="500" cellpadding="0" cellspacing="0" style="border-collapse:collapse; border:1px solid #1a518a" align="left">
  <tr>
    <td>
    	<table width="500" height="25" border="0" cellpadding="0" cellspacing="0"  align="left">
        	<tr>
            	<td align="left">
                	<table border="0" cellpadding="0" cellspacing="0" align="left">
                    <tr style="background-color:#4b80b6">
                   	 <td width="483" align="left" style="font-size:14px; color:#ffffff; font-weight:bold;"><img src="/images/popup_icon1.gif" alt="" border="0" style="padding:0 0 2px 0;"/>&nbsp;수강이력조회[<font color="#FFFF33"><%=login_nm %></font>]</td>
                	 <td align="right"><img src="/images/popup_icon2.gif" alt="" border="0" style="padding:0 0 2px 0;"/></td>
                    </tr>
                    </table>
                </td>
            </tr>
            <tr>
            	<td>
                	<table border="0" cellpadding="0" cellspacing="0" align="left">
                        <tr>
                         <td align="left" style="font-size:12px; font-weight:bold; padding:5px 0 2px 10px;">&nbsp;- 학습중인 과정</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
           	  <td align="center">
                	<table width="100%" border="0" class="View_table">
                      <tr>
                        <td class="table_th">과정명</td>
                        <td class="table_th">진도율</td>
                        <td class="table_th">총점</td>
                        <td class="table_th">수료여부</td>
                        <td class="table_thEND">학습기간</td>
                      </tr>
                     <%if(al1.size() > 0){ %>
                      <%for(int i=0; i<al1.size(); i++){
                    	  map_al1 = (HashMap)al1.get(i);
					  %>
                      <tr>
                        <td><%=map_al1.get("poi_nm") %></td>
                        <td><%=map_al1.get("final_prog_rate") %></td>
                        <td><%=map_al1.get("final_tot_point") %></td>
                        <td><%out.println(map_al1.get("fin_whether")); %></td>
                        <td><%=map_al1.get("std_dt") %></td>
                      </tr>
                      <%} %>
                     <%}else{ %>
                      <tr>
                      	<td colspan="5">학습중인 과정이 없습니다</td>
                      </tr>
                     <%} %>
                   </table>
                </td>
            </tr> 
            <tr>
            	<td>
                	<table border="0" cellpadding="0" cellspacing="0" align="left">
                        <tr>
                         <td align="left" style="font-size:12px; font-weight:bold; padding:5px 0 2px 10px;">&nbsp;- 수강신청중인 과정</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
           	  <td align="center">
                	<table width="100%" border="0" class="View_table">
                      <tr>
                        <td class="table_th">과정명</td>
                        <td class="table_th">진도율</td>
                        <td class="table_thEND">총점</td>
                      </tr>
                     <%if(al2.size() > 0){ %>
                      <%for(int i=0; i<al2.size(); i++){
                    	  map_al2 = (HashMap)al2.get(i);
                      %>
                      <tr>
                        <td><%=map_al2.get("poi_nm") %></td>
                        <td><%=map_al2.get("final_prog_rate") %></td>
                        <td><%=map_al2.get("final_tot_point") %></td>
                      </tr>
                      <%} %>
                     <%}else{ %>
                      <tr>
                      	<td colspan="3">수강신청중인 과정이 없습니다</td>
                      </tr>
                     <%} %>
                   </table>
                </td>
            </tr> 
            <tr>
            	<td>
                	<table border="0" cellpadding="0" cellspacing="0" align="left">
                        <tr>
                         <td align="left" style="font-size:12px; font-weight:bold; padding:5px 0 2px 10px;">&nbsp;- 학습종료 과정</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
           	  <td align="center">
                	<table width="100%" border="0" class="View_table">
                      <tr>
                        <td class="table_th">과정명</td>
                        <td class="table_th">구분</td>
                        <td class="table_th">수료여부</td>
                        <td class="table_th">총점</td>
                        <td class="table_thEND">학습기간</td>
                      </tr>
                     <%if(al3.size() > 0){ %>
                      <%for(int i=0; i<al3.size(); i++){
                    	  map_al3 = (HashMap)al3.get(i);
					  %>
                      <tr>
                        <td><%=map_al3.get("poi_nm") %></td>
                        <td><%=map_al3.get("insu_app_yn") %></td>
                        <td><%=map_al3.get("fin_yn") %></td>
                        <td><%=map_al3.get("final_tot_point") %></td>
                        <td><%=map_al3.get("std_dt") %></td>
                      </tr>
                      <%} %>
                     <%}else{ %>
                     <tr>
                     	<td colspan="5">종료된 과정이 없습니다</td>
                     </tr>
                     <%} %>
                   </table>
                </td>
            </tr>       
        </table>
     </td>
  </tr>
</table>
</body>
</html>
